home *** CD-ROM | disk | FTP | other *** search
- #ifndef ODBCSHAREDLIBRARIES_H
- #define ODBCSHAREDLIBRARIES_H
-
- #ifndef WIN2MAC_H
- #include "win2mac.h"
- #endif
-
- #if PPCODBC
-
- #include <CodeFragments.h>
-
- #define kODBCLibTypeResType 'odbc'
- #define kODBCLibTypeResID 1
-
- // note: these constants must be kept in sync w/ ODBCTypes.r
- #define kODBCSystemLibTypeID "\pODBC Shared Library: System"
- #define kODBCDriverLibTypeID "\pODBC Shared Library: Driver"
- #define kODBCSetupLibTypeID "\pODBC Shared Library: Setup"
- #define kODBCTranslateLibTypeID "\pODBC Shared Library: Translate"
- #define kODBCNetLibTypeID "\pODBC Shared Library: NetLib"
-
- typedef const char * ODBCLibType;
- typedef char * ODBCLibId;
-
- struct ODBCLibConnection
- {
- ConnectionID connId;
- FSSpec spec;
- };
- typedef struct ODBCLibConnection ODBCLibConnection;
-
- struct ODBCLibResContext
- {
- short savedRefNum;
- short libResFile;
- };
- typedef struct ODBCLibResContext ODBCLibResContext;
-
-
- #ifdef __FRAGLOAD__
- enum { kInMem = 0, kOnDiskFlat = 1, kOnDiskSegmented = 2 }; // where
- #endif
-
- typedef void (* PPCMainPtr)( Handle hinst2init );
-
- #else
-
- #include "LibraryManager.h"
- #include "LibraryManagerUtilities.h"
- #include "ODBCASLM.h"
-
- #define kODBCDriverLibTypeID kODBCdbmsDriverParentID
- #define kODBCSetupLibTypeID kODBCdbmsSetupParentID
- #define kODBCTranslateLibTypeID kODBCdataTranslateParentID
-
- typedef TFunctionSetID ODBCLibType;
- typedef TFunctionSetID ODBCLibId;
- typedef Ptr ODBCLibConnection;
- struct ODBCLibResContext
- {
- long savedRefNum;
- TLibraryFile * dllfile;
- };
- typedef struct ODBCLibResContext ODBCLibResContext;
-
- #endif
-
- OSErr ODBCLibNames( ODBCLibType libType, char* buffer, WORD bufferMax, WORD* bufferSize );
- OSErr ODBCGetLibId( ODBCLibType libType, char* libName, ODBCLibId* libId );
- void ODBCFreeLibId( ODBCLibId libId );
- OSErr ODBCLibUseRes( HMODULE dll, ODBCLibResContext* context );
- OSErr ODBCLibCloseRes( ODBCLibResContext* context );
- OSErr ODBCLibUseLocalRes( ODBCLibResContext* context );
- OSErr ODBCLibCloseLocalRes( ODBCLibResContext* context );
-
- #define kConfigDSNId "ConfigDSN"
- #define kConfigTranslatorId "ConfigTranslator"
-
- #endif // ODBCSHAREDLIBRARIES_H